<template>
  <div>
    <Button type="primary" size="small" :disabled="stats" @click="print">打印</Button>
  </div>
</template>

<script>
  export default {
    name: 'PrintButton',
    props: {
      Url: null,
      Project_id: null,
      Atype: null
    },
    data() {
      return {
        stats: true
      }
    },
    created() {
      if (this.Project_id != null) {
        this.stats = false
      }
    },
    methods: {
      print() {
        let baseUrl = "http://xal.letqvc.cn/eao/"
        if(this.Atype != null){
          window.open(baseUrl + this.Url + "?Project_id=" + this.Project_id + '&Atype=' + this.Atype, 'newwindow');
        }else{
           window.open(baseUrl + this.Url + "?Project_id=" + this.Project_id , 'newwindow');
        }
      }
    }
  }
</script>

<style scoped>

</style>